/**
 * @Author：jojo
 * @Date：2022/1/22 11:34
 * @Description :TODO
 */

interface Good{
    public void buy();
}
class Who implements Good{

    @Override
    public void buy() {
        System.out.println("我买一瓶牛奶");
    }
}

class ProxyL implements Good{

    Who who;

    public ProxyL(Who who) {
        this.who = who;
    }

    @Override
    public void buy() {
        System.out.println("找我代购买一送一");
        who.buy();
        System.out.println("ok被骗一瓶牛奶钱");
    }
}
public class StaticProxy {
    public static void main(String[] args) {
        ProxyL proxyL = new ProxyL(new Who());
        proxyL.buy();
    }
}
